package com.ruoyi.employer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.employer.mapper.CargoSourceDetailsMapper;
import com.ruoyi.employer.domain.CargoSourceDetails;
import com.ruoyi.employer.service.ICargoSourceDetailsService;

/**
 * 货源详情Service业务层处理
 * 
 * @author adf
 * @date 2024-08-14
 */
@Service
public class CargoSourceDetailsServiceImpl implements ICargoSourceDetailsService 
{
    @Autowired
    private CargoSourceDetailsMapper cargoSourceDetailsMapper;

    /**
     * 查询货源详情
     * 
     * @param id 货源详情主键
     * @return 货源详情
     */
    @Override
    public CargoSourceDetails selectCargoSourceDetailsById(Long id)
    {
        return cargoSourceDetailsMapper.selectCargoSourceDetailsById(id);
    }

    /**
     * 查询货源详情
     *
     * @param id 货主ID
     * @return 货源详情
     */
    @Override
    public List<CargoSourceDetails> selectCargoSourceDetailsListByCargoUserId(Long id)
    {
        return cargoSourceDetailsMapper.selectCargoSourceDetailsListByCargoUserId(id);
    }

    /**
     * 查询货源详情列表
     * 
     * @param cargoSourceDetails 货源详情
     * @return 货源详情
     */
    @Override
    public List<CargoSourceDetails> selectCargoSourceDetailsList(CargoSourceDetails cargoSourceDetails)
    {
        return cargoSourceDetailsMapper.selectCargoSourceDetailsList(cargoSourceDetails);
    }

    /**
     * 新增货源详情
     * 
     * @param cargoSourceDetails 货源详情
     * @return 结果
     */
    @Override
    public int insertCargoSourceDetails(CargoSourceDetails cargoSourceDetails)
    {
        return cargoSourceDetailsMapper.insertCargoSourceDetails(cargoSourceDetails);
    }

    /**
     * 修改货源详情
     * 
     * @param cargoSourceDetails 货源详情
     * @return 结果
     */
    @Override
    public int updateCargoSourceDetails(CargoSourceDetails cargoSourceDetails)
    {
        return cargoSourceDetailsMapper.updateCargoSourceDetails(cargoSourceDetails);
    }

    /**
     * 批量删除货源详情
     * 
     * @param ids 需要删除的货源详情主键
     * @return 结果
     */
    @Override
    public int deleteCargoSourceDetailsByIds(Long[] ids)
    {
        return cargoSourceDetailsMapper.deleteCargoSourceDetailsByIds(ids);
    }

    /**
     * 删除货源详情信息
     * 
     * @param id 货源详情主键
     * @return 结果
     */
    @Override
    public int deleteCargoSourceDetailsById(Long id)
    {
        return cargoSourceDetailsMapper.deleteCargoSourceDetailsById(id);
    }
}
